package com.lanhe.order.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lanhe.order.domain.LhOrdersLevelLog;
import com.lanhe.order.mapper.LhOrdersLevelLogMapper;
import com.lanhe.order.service.ILhOrdersLevelLogService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;

/**
 * 会员订单表回调记录(LhOrdersLevelLog)表服务实现类
 *
 * @author zhanggl
 * @since 2024-01-04 22:27:26
 */
@Service
public class LhOrdersLevelLogServiceImpl extends ServiceImpl<LhOrdersLevelLogMapper, LhOrdersLevelLog> implements ILhOrdersLevelLogService {

	@Autowired
	private LhOrdersLevelLogMapper ordersLevelLogMapper;

	/**
	 * 新增
	 *
	 * @param ordersLevelLog 实体
	 * @return java.lang.Long
	 * @author zhanggl
	 * @date 2024/1/5
	 */
	@Override
	public Long insertOrdersLevelLog(LhOrdersLevelLog ordersLevelLog) {

		ordersLevelLog.setCreateTime(new Date());
		ordersLevelLogMapper.insert(ordersLevelLog);
		return ordersLevelLog.getOrderId();
	}

	/**
	 * 更新
	 *
	 * @param ordersLevelLog 实体
	 * @author zhanggl
	 * @date 2024/1/5
	 */
	@Override
	public void updateOrdersLevelLog(LhOrdersLevelLog ordersLevelLog) {
		ordersLevelLogMapper.updateById(ordersLevelLog);
	}
}

